package com.itheima.service;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.api.OmsOrderReturnApplyApi;
import com.itheima.dto.statusParamDto;
import com.itheima.pojo.OmsOrder;
import com.itheima.vo.MinioVo;
import com.itheima.vo.OmsVo.ReturnApplyListVo;
import com.itheima.vo.PageResult;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

/**
 * @author 芝士雪豹
 * @create 2022/10/15/0:32
 */
@Service
public class OmsOrderReturnApplyService {
    @DubboReference
    private OmsOrderReturnApplyApi applyApi;

    //批量删除退货申请
    public MinioVo delete(Integer[] ids) {
        MinioVo vo = applyApi.delete(ids);
        return vo;
    }

    //分页查询退货申请
    public PageResult List(ReturnApplyListVo vo) {
        PageResult pageResult = applyApi.list(vo);
        return pageResult;
    }

    //修改退货申请状态
    public MinioVo updateStatus(Integer id, statusParamDto dto) {
        MinioVo vo = applyApi.updateStatus(id, dto);
        return vo;
    }

    //获取退货申请详情
    public MinioVo findById(Integer id) {
        MinioVo vo = applyApi.findById(id);
        return vo;
    }
}
